package com.groupbuying.common.baseutils.baseframework4plugins.exception;

import com.groupbuying.common.baseutils.baseframework4plugins.message.MessageHelper;

/**
 * @anthor zmlmagic
 * @date 2018/12/26 6:02 PM
 * @company 蒙泰互联网公司
 * @des 备注说明
 **/

public class LogException extends RuntimeException {
    private String msgId;
    private String logInfo;
    private Throwable originException;

    public LogException(String msgId) {
        this(msgId, (Throwable) null);
    }

    public LogException(String msgId, Throwable originException) {
        this(msgId, "", originException);
    }

    public LogException(String msgId, String logInfo, Throwable originException) {
        this.msgId = msgId;
        this.logInfo = logInfo;
        this.originException = originException;
    }

    public Throwable getOriginException() {
        return this.originException;
    }

    public String getLogInfo() {
        return this.logInfo;
    }

    public String getMessage() {
        return MessageHelper.getMessage(this.msgId);
    }
}

